<?php

require_once(sfConfig::get('sf_plugins_dir').'/sfDoctrineGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php');

class sfGuardAuthActions extends BasesfGuardAuthActions
{
  public function executeNewAction()
  {
    return $this->renderText('This is a new sfGuardAuth action.');
  }

  public function executeSignout($request)
  {

    sfBrowser::clearCookies();
    $this->getUser()->signOut();

    //$this->getUser()->shutDown();

    $signoutUrl = sfConfig::get('app_sf_guard_plugin_success_signout_url', $request->getReferer());

    $this->redirect('' != $signoutUrl ? $signoutUrl : '@homepage');
  }

}

